#ifndef _OI_OPTEXTSENSOR_HPP_
#define _OI_OPTEXTSENSOR_HPP_

#include "PLScannerCore/Camera/OiDevice.hpp"

namespace Oi
{
    namespace PLScannerCore
    {
        class OI_PLSCANNER_CORE_API OptexSensorControl : public PLScannerCore::Device
        {
           Q_OBJECT

        public:
            OptexSensorControl();
            ~OptexSensorControl();

        public:
            void init(); 
            void exit(); 

        public:
            void startCapture();
            void stopCapture(int wait = 1000);

            void abortDownload();

        public:
            bool getInfos(QMap<QDateTime, QString>& infos);
            bool getProifile(std::vector<double>& profile, QVariantMap& infos, const int timeout = -1); 
            bool getValue(double& profile, const int timeout = -1); 
            bool loadFile(const QString file, std::vector<double>& profile);
            bool getTemperature1(double& temperature);
            bool getTemperature2(double& temperature);

        public slots:
           void onReadReady1(const QByteArray data);
           void onReadReady2(const QByteArray data);

        public:
            int getStatus();

        private:
            OI_DISABLE_COPY(OptexSensorControl);
            OI_DECLARE_IMPL(OptexSensorControl);
        };
    }
}
#endif
